package defaultPackage;

import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.net.URLClassLoader;

import javax.imageio.ImageIO;

public enum CrewType 
{
	Crewman(false,"Untitled.png",15,"Crewman",100),
	Captain(true,"YellowShirt.png",10,"Captain",115),
	ScienceOfficer(true,"BlueShirt.png",15,"Sci. Officer",80),
	Engineer(false,"GreenShirt.png",20,"Engineer",100),
	SecurityOfficer(false,"Untitled.png",10,"Security",125);
	
	BufferedImage sprite = null;

	private CrewType(boolean officer,String imageFile,int speed,String designation,int startHealth)
	{
		this.startHealth = startHealth;
		this.designation = designation;
		this.officer = officer;
		this.speed = speed;
		try {
			sprite = ImageIO.read(URLClassLoader.getSystemResource("res/Sprites/"+imageFile));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public void draw(Graphics g,int x,int y)
	{
		g.drawImage(sprite, x*10, y*10, null);
	}
	
	public boolean isOfficer()
	{
		return officer;
	}
	
	boolean officer;
	int speed,startHealth;
	String designation;
}
